package org.ivwsqii.composite.test;

import org.ivwsqii.composite.Component;
import org.ivwsqii.composite.Composite;
import org.ivwsqii.composite.Leaf;

public class Client {

	public static void main(String[] args) {
		Component root = new Composite("服装");
		Component man = new Composite("男装");
		Component human = new Composite("女装");
		Component childMan1 = new Leaf("衬衫");
		Component childMan2 = new Leaf("夹克");
		Component childHuman1 = new Leaf("裙子");
		Component childHuman2 = new Leaf("套装");
		root.addChild(man);
		root.addChild(human);

		man.addChild(childMan1);
		man.addChild(childMan2);

		human.addChild(childHuman1);
		human.addChild(childHuman2);

		root.printStruts("");
	}
}
